/********************************************************************************
 *      Copyright:  (C) 2022 Zhang Changxing<ZhangChangxingVIP@163.com>
 *                  All rights reserved.
 *
 *       Filename:  packinfo.h
 *    Description:  This head file 
 *
 *        Version:  1.0.0(04/13/2022)
 *         Author:  Zhang Changxing <ZhangChangxingVIP@163.com>
 *      ChangeLog:  1, Release initial version on "04/13/2022 01:24:02 AM"
 *                 
 ********************************************************************************/

#ifndef  _PACKINFO_H_
#define  _PACKINFO_H_

#define DEVID_LEN   16
#define TIME_LEN   32

typedef struct pack_info_s
{
    char    devid[DEVID_LEN];
    char    strtime[TIME_LEN];
    float   temper;
}pack_info_t;


/*
 *   description:   The received string is parsed and stored in the pack_info structure
 *          args:   $buf:    Data read from the client
 *                  $pack_info:     Packet structure
 *  return value:   <0: failure,    =0:ok 
 */

int data_segmentation(char *buf, pack_info_t *pack_info);

#endif